blanket replace of gbfprintf arguments using .toUtf8().data() to avoid potential...
authortsteven4 <tsteven4@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 16 Sep 2014 15:58:29 +0000 (15:58 +0000)
committertsteven4 <tsteven4@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 16 Sep 2014 15:58:29 +0000 (15:58 +0000)
gpsbabel/delbin.cc
gpsbabel/html.cc
gpsbabel/text.cc
gpsbabel/tiger.cc
gpsbabel/vcf.cc

index 536d64a914cb922d3354b3596070869e04f9530a..0284711ef5ec14c5a8aa9b94b5c96f44079a1c72 100644 (file)
@@ -1205,7 +1205,7 @@ get_gc_notes(const Waypoint* wp, int* symbol, char** notes, unsigned* notes_size
   if (!wp->description.isEmpty()) {
     gbfputs(wp->description, fd);
     if (!wp->gc_data->placer.isEmpty()) {
-      gbfprintf(fd, " by %s", wp->gc_data->placer.toUtf8().data());
+      gbfprintf(fd, " by %s", CSTR(wp->gc_data->placer));
     }
     gbfputc('\n', fd);
   }
@@ -1215,7 +1215,7 @@ get_gc_notes(const Waypoint* wp, int* symbol, char** notes, unsigned* notes_size
     gbfprintf(fd, "%s\n", waypoint_symbol(gc_sym));
     *symbol = gc_sym;
   } else if (!wp->icon_descr.isNull()) {
-    gbfprintf(fd, "%s\n", wp->icon_descr.toUtf8().data());
+    gbfprintf(fd, "%s\n", CSTR(wp->icon_descr));
   }
   switch (wp->gc_data->container) {
   case gc_micro:
@@ -1257,7 +1257,7 @@ get_gc_notes(const Waypoint* wp, int* symbol, char** notes, unsigned* notes_size
     gbfprintf(fd, "/T%u\n", wp->gc_data->terr / 10);
   }
   if (!wp->gc_data->hint.isEmpty() && !opt_hint_at_end) {
-    gbfprintf(fd, "HINT: %s\n", wp->gc_data->hint.toUtf8().data());
+    gbfprintf(fd, "HINT: %s\n", CSTR(wp->gc_data->hint));
   }
   if (!wp->gc_data->desc_short.utfstring.isEmpty() || !wp->gc_data->desc_long.utfstring.isEmpty()) {
     gbfputs("DESC: ", fd);
@@ -1312,7 +1312,7 @@ get_gc_notes(const Waypoint* wp, int* symbol, char** notes, unsigned* notes_size
     }
   }
   if (!wp->gc_data->hint.isEmpty() && opt_hint_at_end) {
-    gbfprintf(fd, "\nHINT: %s\n", wp->gc_data->hint.toUtf8().data());
+    gbfprintf(fd, "\nHINT: %s\n", CSTR(wp->gc_data->hint));
   }
   gbfputc(0, fd);
   *notes_size = fd->memlen;
index 8655cdaaba0e8d96ccd51eb99bfb709961943bf3..6d7f295b0b30978f24d48ecdb6d020a2693cea25 100644 (file)
@@ -104,13 +104,13 @@ html_disp(const Waypoint* wpt)
     if (wpt->HasUrlLink()) {
       char* d = html_entitize(CSTRc(wpt->description));
       UrlLink link = wpt->GetUrlLink();
-      gbfprintf(file_out, "<a href=\"%s\">%s</a>", link.url_.toUtf8().data(), d);
+      gbfprintf(file_out, "<a href=\"%s\">%s</a>", CSTR(link.url_), d);
       xfree(d);
     } else {
       gbfprintf(file_out, "%s", CSTRc(wpt->description));
     }
     if (!wpt->gc_data->placer.isEmpty()) {
-      gbfprintf(file_out, " by %s", wpt->gc_data->placer.toUtf8().data());
+      gbfprintf(file_out, " by %s", CSTR(wpt->gc_data->placer));
     }
   }
   gbfprintf(file_out, "</p></td>\n");
index a0a8e77587c96b8771eb5e6ac1aee5aae63b3933..f908fa5992c07ea14fbe301929a2f2b53e8dae74 100644 (file)
@@ -132,7 +132,7 @@ text_disp(const Waypoint* wpt)
   if (wpt->description != wpt->shortname) {
     gbfprintf(file_out, "%s", CSTRc(wpt->description));
     if (!wpt->gc_data->placer.isEmpty()) {
-      gbfprintf(file_out, " by %s", wpt->gc_data->placer.toUtf8().data());
+      gbfprintf(file_out, " by %s", CSTR(wpt->gc_data->placer));
     }
   }
   if (wpt->gc_data->terr) {
index 18a65fae250eb9587e38f6dcf6658242f4ad73b5..702d13df6ad7472a630224d7c2d010a2880fc579 100644 (file)
@@ -210,7 +210,7 @@ tiger_disp(const Waypoint* wpt)
     }
   }
 
-  gbfprintf(file_out, "%f,%f:%s", lon, lat, pin.toUtf8().data());
+  gbfprintf(file_out, "%f,%f:%s", lon, lat, CSTR(pin));
   if (!nolabels) {
     QString temp;
     QString desc = csv_stringclean(wpt->description, ":");
index 09343aa00fc7e74769f2ca3a2c799a4c11d3708a..3834c2af47754d99b50325cc1d63d49980a29f4e 100644 (file)
@@ -108,7 +108,7 @@ vcf_disp(const Waypoint* wpt)
 
   if (wpt->HasUrlLink()) {
     UrlLink link = wpt->GetUrlLink();
-    gbfprintf(file_out, "URL:%s\n", link.url_.toUtf8().data());
+    gbfprintf(file_out, "URL:%s\n", CSTR(link.url_));
   }
 
   gbfprintf(file_out, "NOTE:");